<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>静态发布方式 &lsaquo; KISSY Docs</title>
<link rel="stylesheet" href="../../../assets/base-min.css" />
<link rel="stylesheet" href="../../../assets/docs.css" />
</head>
<body class="w866">
<div id="header">
    <a class="logo" href="../../../index.html"><img src="../../../assets/logo.png" alt="KISSY" width="138" height="74" /></a>
    <p class="rel-nav">
        <a href="http://github.com/kissyteam/kissy/blob/master/src/flash/flash-embed.js"><code>flash-embed.js</code></a>
    </p>
</div>
<div id="content" class="layout grid-s232m0">
    <div class="col-main">
        <div class="main-wrap">
			<div class="section summary">
				<dl>
					<dt>本章节将假设您已了解以下内容：</dt>
					<dd><a href="../references/alternative-content.html" target="_blank">alternative content</a></dd>
					<dd><a href="../references/embed-swf-onto-webpage.html">嵌入SWF的几种方式</a></dd>
					<dd><a href="../references/flashplayer-parameters.html">Flash播放器参数</a></dd>
					<dt>Requested:</dt>
					<dd><a href="http://github.com/kissyteam/kissy/blob/master/build/packages/core.js">KISSY CORE</a></dd>
					<dd><a href="http://github.com/kissyteam/kissy/blob/master/build/json/json-pkg.js" target="_blank">JSON package</a></dd>
					<dd><a href="http://github.com/kissyteam/kissy/blob/master/src/flash/flash-ua.js">Flash UA</a></dd>
					<dt>Editors:</dt>
					<dd><a href="mailto:longzang@taobao.com">龙藏</a>,Taobao,Inc</p></dd>
				</dl>
			</div>
			<div class="section">
				<a name="section_1"></a>
				<h3>关于</h3>
				<div class="detail">
					<p>假如您已阅读了“<a href="../references/embed-swf-onto-webpage.html">嵌入SWF的几种方式</a>” 和 “<a href="../references/flashplayer-parameters.html">Flash播放器参数</a>”，这里将会变的非常简单。</p>
				</div>
			</div>
			<div class="section">
				<a name="section_2"></a>
				<h3>一般方法</h3>
				<div class="detail">
					<h4>HTML步骤:</h4>
					<ol>
						<li>
							在SWF内容前，至少引入以下JS：
<pre class="example-code"><code>
&lt;script src="ks-core.js"&gt;&lt;/script&gt;
&lt;script src="json.js"&gt;&lt;/script&gt;
&lt;script src="flash-pkg.js"&gt;&lt;/script&gt;	
</code></pre>
						</li>
						<li>
							在期望的位置写上 SWF嵌入代码。（这里以 O-O方式插入）
<pre class="example-code"><code>
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="200" height="150" id="myFlashContent2"&gt;
    &lt;param name="movie" value="assets/test.swf"/&gt;
    &lt;!--[if !IE]&gt;--&gt;
    &lt;object type="application/x-shockwave-flash" 
	data="assets/test.swf" width="200" height="150"&gt;
    &lt;!--&lt;![endif]--&gt;
    &lt;a href="http://www.adobe.com/go/getflashplayer"&gt;
        &lt;img src="get_flash_player.gif" alt="Get Adobe Flash player"/&gt;
    &lt;/a&gt;
    &lt;!--[if !IE]&gt;--&gt;
    &lt;/object&gt;
    &lt;!--&lt;![endif]--&gt;
&lt;/object&gt;
</code></pre>
						</li>
					</ol>
					<h4>Javascript步骤:</h4>
					<ol>
						<li>
							期望插入的SWF对象之后，插入操作SWF的相关JS代码：
<pre class="example-code"><code>
&lt;script src="PATH2YOURSCRIPT.js"&gt;&lt;/script&gt;
</code></pre>
						</li>
						<li>
							或在SCRIPT标签中写上相关操作SWF的JS代码 
<pre class="example-code"><code>
&lt;script&gt;
	//do sth.
&lt;/script&gt;
</code></pre>							
						</li>
						<li>
							在代码中可以这么写：
<pre class="example-code"><code>
F.add('#myFlashContent2');  //注意  "#" 号.
</code></pre>							
						</li>
					</ol>
				</div>
			</div>
			<div class="section notes">
		 	<p>
		 		<a href="http://github.com/kissyteam/kissy/issues">更多意见和建议？</a>
		 	</p>
		 </div>
        </div>
    </div>
    <div class="col-sub">
        <div class="sub-wrap">
            <div class="loc">
                <a href="../../../index.html">home</a> &rsaquo;
                <a href="../../index.html">flash</a> &rsaquo; 
                <a href="../index.html">start</a> &rsaquo; publishing-static:
            </div>
            <div class="toc">
            	<ul>
            		<li><a href="#section_1">关于</a></li>
            		<li><a href="#section_2">一般方法</a></li>
            	</ul>
            </div>
        </div>
    </div>
</div>
<div id="footer">
    <p class="copyright">&copy; 2009 - 2029 KISSY UI LIBRARY</p>
</div>
</body>
</html>
